Over the past decade, opioid analgesic use has doubled, becoming a leading strategy to manage chronic pain. Simultaneously, opioid use disorder and overdoses have dramatically increased. To address this opioid epidemic, one rapidly expanding strategy to manage chronic pain is medical cannabis. As of January 2017, medical cannabis is legal in 28 states, and 27 states include pain as a qualifying condition. Although studies demonstrate analgesic effects of cannabis, few have examined how medical cannabis affects opioid analgesic use. Studies have not examined long-term medical cannabis use or compared medical cannabis products with different ?9-tetrahydrocannabinol (THC) and cannabidiol (CBD) content. Managing chronic pain in HIV+ adults is particularly challenging, yet few studies have focused on this population. With a high prevalence of chronic pain, opioid analgesic use, and cannabis use among HIV+ adults, it is important to understand how, in HIV+ adults, medical cannabis use affects opioid analgesic use and HIV outcomes. Despite its potential benefits, cannabis has potential adverse events. Few studies have examined adverse events with long-term medical cannabis use, and none have examined adverse events specific to THC/CBD content. Our overarching goal is to understand how medical cannabis use affects opioid analgesic use over time, with attention to THC/CBD content, HIV outcomes, and adverse events. We will conduct a cohort study of 250 HIV+ and HIV- adults with (a) severe or chronic pain, (b) current opioid analgesic use, and (c) who are newly certified for medical cannabis. Over 18 months, we will collect data via 7 in-person visits every 3 months and 39 web-based questionnaires via cellphones every 2 weeks. Data sources will include: questionnaires; medical, pharmacy, and Prescription Monitoring Program (PMP) records; urine and blood samples; and qualitative interviews. Over participants? 2-week time period (unit of analysis), medical cannabis exposure will be the number of days of medical cannabis use (primary exposure measure), and opioid analgesic use will be the cumulative opioid analgesic dose (primary outcome measure). We will examine how medical cannabis use affects: 1) opioid analgesic use, 2) HIV outcomes, and 3) adverse events. We hypothesize that (1) medical cannabis use will be associated with a reduction in opioid analgesic use, (2) the association between medical cannabis and opioid analgesic use will differ by THC/CBD content, (3) HIV outcomes will differ by medical cannabis use and THC/CBD content, and (4) more medical cannabis use and higher THC (vs. CBD) content will be associated with more adverse events. In addition, we will qualitatively explore individuals? perceptions of how their medical cannabis use affects their opioid analgesic use. As medical cannabis use continues to expand, and as the opioid epidemic continues to grow, our study findings will have important individual and public health implications that have the potential to shape clinical care and medical cannabis policies.